package china.accountinghelper.activity;

import android.os.Bundle;
import android.support.v4.view.ViewPager;
import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
import android.widget.Button;

import china.wc.tallyhelper.R;
import china.wc.tallyhelper.adapter.AdapterViewPagerWelcom;

import com.xdroid.base.ActivityBase;

public class ActivityWelcom extends ActivityBase implements OnClickListener
{
    private AdapterViewPagerWelcom mAdapterViewPagerWelcom;
    
    private ViewPager mWelcom_ViewPager;
    private Button mWelcom_Button;
    
    @Override
    protected void onCreate(Bundle pSavedInstanceState)
    {
        super.onCreate(pSavedInstanceState);
        // 取消系统默认的标题栏
        this.requestWindowFeature(Window.FEATURE_NO_TITLE);
        
        setContentView(R.layout.welcom);
        
        initFields();
        initViews();
        initListeners();
        bindData();
        register();
    }

    @Override
    protected void initFields()
    {
        mAdapterViewPagerWelcom = new AdapterViewPagerWelcom(this);
    }

    @Override
    protected void initViews()
    {
        mWelcom_ViewPager = (ViewPager) findViewById(R.id.Welcom_ViewPager);
        mWelcom_Button = (Button) findViewById(R.id.Welcom_Button);
    }

    @Override
    protected void initListeners()
    {
        mWelcom_Button.setOnClickListener(this);
    }

    @Override
    protected void bindData()
    {
        mWelcom_ViewPager.setAdapter(mAdapterViewPagerWelcom);
    }

    @Override
    protected void register()
    {
    }

    @Override
    public void onClick(View v)
    {
        if (v==mWelcom_Button) {
            finish();
        }
    }

}
